Skip to content

feat: add connection profiles and remote auth flow#121

Merged
ibourgeois merged 2 commits intomainfrom
codex/feat-90-connection-profiles
Mar 25, 2026
Merged

feat: add connection profiles and remote auth flow#121
ibourgeois merged 2 commits intomainfrom
codex/feat-90-connection-profiles

Conversation

@ibourgeois
Copy link
Contributor

Summary

  • add saved instance connection profiles with active switching, editing, and deletion
  • introduce in-app remote server authentication and persist remote identity/cookie context per connection
  • refine the desktop shell and auth surfaces around connections, profile state, and current-instance behavior

Testing

  • vendor/bin/pint --dirty --format agent
  • php artisan test --compact tests/Feature/InstanceConnectionManagementTest.php tests/Feature/FortifyAuthenticationTest.php tests/Feature/DesktopShellTest.php

Copilot AI review requested due to automatic review settings March 25, 2026 03:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a first-class “instance connection” concept to the desktop shell, enabling users to save/switch server connection profiles and authenticate to remote Katra servers in-app while persisting per-connection remote identity + cookie context.

Changes:

  • Introduce InstanceConnection model + persistence (migration/factory) and a manager service for resolving/activating connections.
  • Add remote in-app server authentication flow (guest + saved-connection) and wire up new connection/profile routes.
  • Update desktop shell UI to be connection-aware (switching, editing, deletion) and expand feature/flow test coverage.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
tests/Feature/InstanceConnectionManagementTest.php New end-to-end tests for connection CRUD/activation, shell behavior, and remote auth context persistence.
tests/Feature/FortifyAuthenticationTest.php Extends guest “connect server” coverage to include in-app credential step and remote sign-in behavior.
tests/Feature/DesktopUiFeatureFlagTest.php Ensures DB-backed user records exist for feature-flag scope tests (uses RefreshDatabase + create).
tests/Feature/DesktopShellTest.php Updates shell expectations to reflect connection-aware UI and active connection rendering.
routes/web.php Adds connection/profile/auth routes and moves home/profile into auth group.
resources/views/welcome.blade.php Replaces workspace selector surface with a connections switcher + add/edit/delete connection modals.
resources/views/components/desktop/profile-menu.blade.php Adjusts shell profile menu styling and removes “Manage connections” entry.
resources/views/auth/connect-server.blade.php Converts server connect screen into a 2-step flow (URL → credentials) and supports saved-connection sign-in.
resources/css/app.css Adds hover/transition styling for the shared “connection trigger” surface.
database/migrations/2026_03_24_083829_create_instance_connections_table.php Creates instance_connections table with metadata + session context storage.
database/factories/InstanceConnectionFactory.php Factory states for server/current-instance connections for tests.
app/Support/Connections/RemoteInstanceAuthenticator.php Implements remote login form bootstrap, CSRF extraction, cookie capture, and optional profile fetch.
app/Support/Connections/InstanceConnectionManager.php Centralizes connection listing, active resolution, activation tracking, and auth context persistence.
app/Models/User.php Adds instanceConnections() relationship.
app/Models/InstanceConnection.php New model with encrypted session context + computed attributes for UI.
app/Http/Requests/UpdateInstanceConnectionRequest.php Validation rules for editing/renaming current-instance vs server connections.
app/Http/Requests/StoreInstanceConnectionRequest.php Validation rules/messages for adding a saved server connection.
app/Http/Requests/ConnectServerRequest.php Validation rules/messages for guest “server URL” step.
app/Http/Requests/AuthenticateRemoteInstanceConnectionRequest.php Validation rules/messages for remote credential submission (guest or authed).
app/Http/Controllers/InstanceConnectionController.php Implements connect/prepare/authenticate flows plus connection CRUD and profile endpoint.
app/Http/Controllers/HomeController.php Makes the desktop shell render based on the active connection + passes connection/link/viewer identity state to the UI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ibourgeois ibourgeois merged commit 713d8ea into main Mar 25, 2026
1 check passed
@ibourgeois ibourgeois deleted the codex/feat-90-connection-profiles branch March 25, 2026 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants